package com.smforj.ssm.modules.lib.dao.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.smforj.ssm.frame.core.dao.impl.BaseDaoImpl;
import com.smforj.ssm.frame.core.enums.JDataSource;
import com.smforj.ssm.modules.lib.constant.ADataSource;
import com.smforj.ssm.modules.lib.dao.SysBookinfoDao;
import com.smforj.ssm.modules.lib.domain.SysBook;
import com.smforj.ssm.modules.lib.domain.vo.SysBookVo;

@Repository("sysBookinfoDao")
@JDataSource(ADataSource.MASTER)
public class SysBookinfoDaoImpl extends BaseDaoImpl<SysBook> implements SysBookinfoDao {

	@Override
	public SysBookVo selectBookByRfid(String rfid) {  
		return getSqlSessionTemplate().selectOne(getSqlName("selectBookByRfid"), rfid);  
	}

	@Override
	public void deleteBookByRfid(String rfid) { 
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("rfid", rfid); 
		getSqlSessionTemplate().delete(getSqlName("deleteBookByRfid"), params);
	} 

}
